package com.itheima.service.impl;

        import com.itheima.dao.AccountDao;
        import com.itheima.domain.Account;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.stereotype.Component;
        import org.springframework.transaction.annotation.Propagation;
        import org.springframework.transaction.annotation.Transactional;
@Component
public class TranTest {
    @Autowired
    private AccountDao accountDao;
    @Transactional(propagation=Propagation.REQUIRES_NEW)
    public void peint(){
        Account cc=new Account(10,"小写",12.23);
        accountDao.add(cc);
    }
}
